#pragma once

#include <QObject>
#include <QWindow>

class OcctWidget;
class ViewBridge : public QObject
{
    Q_OBJECT
public:
    ViewBridge();
    ~ViewBridge();

    Q_INVOKABLE void resizeEmbeddedWidget(qreal _x, qreal _y, qreal _w, qreal _h);
    Q_INVOKABLE void readPly(int index, QString path);
    Q_INVOKABLE void readPlys(int index, QString path);
    Q_INVOKABLE void removePlys(int index);
    Q_INVOKABLE void readSTEP(QString path);
    Q_INVOKABLE void closeWindow();
    Q_INVOKABLE void unselectFace(int faceID);
    Q_INVOKABLE void setSTEPSlide(int value);

    Q_INVOKABLE void registPly(bool isCoarse);

    void setQmlWindow(QWindow *_window);

private:
    QWindow *m_pQmlWindow;
    OcctWidget *m_pOcctWidget;

signals:
    void widgetReady();
    void faceSelected(int faceID, bool select);
};

